#!/bin/bash

. /etc/profile

echo "kawins 2018-9-18"

set -e

PRO_NAME="kawins-gradle"

rm -rf ${PRO_NAME}
rm -rf $(cd `dirname $0`; pwd)/common
rm -rf $(cd `dirname $0`; pwd)/Jenkinsfile
rm -rf $(cd `dirname $0`; pwd)/script.gradle

git clone https://gitee.com/kawins-cloud/${PRO_NAME}.git

cd ${PRO_NAME}

git checkout master

cd ..

mv ${PRO_NAME}/gradle-boot/script/common independent/script
mv ${PRO_NAME}/gradle-boot/script/Jenkinsfile independent/script
mv ${PRO_NAME}/gradle-boot/script/script.gradle independent/script

rm -rf ${PRO_NAME}